/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.hibernate.annotations.TypeDefs;

/**
 * 说明：
 * Entity Name 采购退货
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TPurchaseReturn")
public class TPurchaseReturn implements Serializable{

	private static final long serialVersionUID = 1L;

	private String ReturnID;//退货编号CHAR(15) PK
	
	private String Employee;//退货人
	
	private String Reason;//退货原因VARCHAR(512)
	
	private String RelPurchaseID;//原相关采购单CHAR(15)
	
	private String Operator;//操作人
	
	private byte AuditStatu;//状态  1为正在申请2为已审核3为已完成（出库或者入库）
	
	private String AuditName;//审核人CHAR(15)
	
	private Date AuditTime;//审核时间 
	
	private Date HappenTime;//操作时间DATETIME

	private Date endTime;//结束时间  查询条件 不进数据库
	
	private String SupplierID;//退货供应商
	
	public TPurchaseReturn(){};
	public TPurchaseReturn(String returnID, String employee, String reason,
			String operator, Date happenTime) {
		super();
		ReturnID = returnID;
		Employee = employee;
		Reason = reason;
		Operator = operator;
		HappenTime = happenTime;
	}

	@Id
	@Column(name = "ReturnID", length=15)
	public String getReturnID() {
		return ReturnID;
	}

	public void setReturnID(String returnID) {
		ReturnID = returnID;
	}

	@Column(name = "Employee", length=15)
	public String getEmployee() {
		return Employee;
	}

	public void setEmployee(String employee) {
		Employee = employee;
	}

	@Column(name = "Reason", length=512)
	public String getReason() {
		return Reason;
	}

	public void setReason(String reason) {
		Reason = reason;
	}

	@Column(name = "RelPurchaseID", length=15)
	public String getRelPurchaseID() {
		return RelPurchaseID;
	}

	public void setRelPurchaseID(String relPurchaseID) {
		RelPurchaseID = relPurchaseID;
	}

	@Column(name = "Operator", length=15)
	public String getOperator() {
		return Operator;
	}

	public void setOperator(String operator) {
		Operator = operator;
	}

	public Date getHappenTime() {
		return HappenTime;
	}

	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}
	@Column(name = "AuditStatu")
	public byte getAuditStatu() {
		return AuditStatu;
	}

	public void setAuditStatu(byte auditStatu) {
		AuditStatu = auditStatu;
	}
	@Column(name = "AuditName",length=15)
	public String getAuditName() {
		return AuditName;
	}

	public void setAuditName(String auditName) {
		AuditName = auditName;
	}
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "AuditTime", nullable = false, length = 19)
	public Date getAuditTime() {
		return AuditTime;
	}

	public void setAuditTime(Date auditTime) {
		AuditTime = auditTime;
	}
	
	@Transient
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@JoinColumn(name="SupplierID")
	public String getSupplierID() {
		return SupplierID;
	}
	public void setSupplierID(String supplierID) {
		SupplierID = supplierID;
	}
}
